1. Field of the Invention
As for a data controlling method permitting a plurality of computers to share a data and to maintain copies of a shared data individually, the present invention relates to a data synchronization method for maintaining a consistency of the shared data among the plurality of computers.
2. Description of the Related Art
With the development of various types of mobile communication networks and general public networks accompanied by the dissemination of mobile information terminals, various mobile information terminal services can now be supplied. On one hand, an internet is also becoming popular. For this reason, needs such as xe2x80x9cwanting to access the data of intranet through the internetxe2x80x9d and xe2x80x9cwanting to use a WEB service being supplied at the internetxe2x80x9d from the mobile information terminals are emerging.
Use of the internet does not involve a cost of using the backbone. The data transfer using the internet is relatively stable. As well, the internet has a potential for a massive data transfer. On contrary, the data transfer using the public networks or the mobile communication networks are rather costly. Especially, the mobile communication networks have disadvantages such as potential for amount of data transfer is small, cutoff of the lines are frequent, and communication is comparatively high-priced.
In order to maintain the consistency of file data copies at a communication environment of high cost and limited potential in the data transferring, a technique disclosed in Japanese unexamined patent publication HEI9-244936 attempts to reduce a data communication traffic by exchanging only a difference generated by a data update.
A communication protocol known as TCP/IP is commonly being used at the internet. The TCP/IP is known as a connection type communication protocol. It configures a communication session between two nodes communicating with one another, and provides a highly reliable communication means. The disclosed technique also adopts the TCP/IP in its communication for maintaining the data consistency. Although the reliability of the communication improves by using the connection type communication protocol, however, use of the connection type communication protocol is disadvantaged that the communication would be limited to a pre-decided pair of two nodes.
The method of maintaining the data consistency by using the connection type communication protocol also has a disadvantage that the communication traffic increases in accordance with the increase in the number of data nodes should be synchronized. If there are more than three nodes even in the same subnet, the communication traffic multiplies based on the number of data synchronization line. Accordingly, this method has a disadvantage that the time taken in the data synchronization is increased as a whole, because of an exclusive use of the network.
The present invention, which relates to a data synchronization method for maintaining and controlling a replicated data, for example aims to supply a data synchronization method which reduces an increase in the communication traffic in comparison with an increase in the number of nodes where the data should be synchronized.
A data communication device of the present invention is the data communication device connected to a communication mechanism which connects to another data communication device, comprising:
a shared data storing unit for storing a shared data replicated and managed by the data communication device and the another data communication device;
a shared data updating unit for updating the shared data stored in the shared data storing unit;
a version managing unit for storing and managing a version of the shared data;
a version communication unit for communicating the version of the shared data by using the communication mechanism;
an update data communication unit for communicating a update data which is a differential data between the shared data before updating and the shared data after updating by using the communication mechanism;
wherein the data communication device executes a plurality of processes as a transmitting side data communication device when the shared data updating unit updates the shared data stored in the shared data storing unit (case (1)), the plurality of processes includes
a process A by the version managing unit, for creating the version of the shared data updated by the shared data updating unit and storing the created version;
a process B by the version communication unit, for transmitting the version stored in the version managing unit; and
a process C by the update data communication unit, for transmitting the update data which is a differential data between the shared data before updating and the shared data after updating;
wherein the data communication device executes a plurality of processes as a receiving side data communication device when the another data communication device updates the shared data stored in the another data communication device (case (2)), the plurality of processes includes:
a process D by the version communication unit, for receiving the version transmitted from the another data communication device;
a process E by the update data communication unit, for receiving the update data transmitted from the another data communication device;
a process F by the version managing unit, for deciding whether to apply the update data based on the version stored in the version managing unit and the version received by the version communication unit, and for storing the received version when the version managing unit decides to apply the update data;
a process G by the shared data storing unit, for storing the update received data when the version managing unit decides to apply the update data.
The data communication device of the present invention executes a process H by the version communication unit, for transmitting the version stored in the version managing unit, in the case (2), in addition to the processes of D to G, as the receiving side data communication device, the data communication device executes a process I by the version communication unit, for receiving the version of the shared data transmitted by the another data communication device, and
a process J by the version managing unit for storing the version of the shared data received by the version communication unit with an identification information of the another data communication device, in the case (1), in addition to the process of A to C, as the transmitting side data communication device.
The data communication device of the present invention stores identification information of the another data communication device and identifies the another data communication device by the stored identification information,
wherein the version communication unit as a part of the transmitting side data communication device transmits the created version to the identified another data communication device in the process B when the shared data updating unit updates the shared data stored in the shared data storing unit in the case (1), and
wherein the update data communication unit as a part of the transmitting side data communication device transmits the update data to the identified another data communication device in the process C when the shared data updating unit updates the shared data stored in the shared data storing unit in the case (1).
The version communication unit as a part of the receiving side data communication device intercepts the version transmitted from the another data communication device in the process D when the another data communication device updates the shared data stored in the another data communication device in the case (2), and
the update data communication unit as a part of the receiving side data communication device intercepts the update data transmitted from the another data communication device in the process E when the another data communication device updates the shared data stored in the another data communication device in the case (2).
The data communication device of the present invention further comprising a mode controlling unit for switching to a mode of declaring data sharing and a data update commencement message communication unit for communicating a message for commencing data update by using the communication mechanism,
wherein the data update commencement message communication unit as a part of the receiving side communication device executes a process of transmitting the message for commencing data update when the shared data updating unit updates the shared data stored in the shared data storing unit in the mode of declaring data sharing,
wherein the version managing unit omits the process A of creating the version of the shared data updated by the shared data updating unit and storing the created version and the version communicating unit omits the process B of transmitting the version stored in the version stored in the version managing unit when the shared data updating unit updates the shared data stored in the shared data storing unit in the mode of declaring data sharing in the case (1),
wherein the shared data updating unit as a part of the receiving side communication device by itself stops updating the shared data stored in the shared data storing unit when the data update commencement message communication unit receives the message for commencing data update in the mode of declaring data sharing,
wherein the version communication unit omits the process D of receiving the version transmitted from the another data communication device and the version managing unit omits the process F of deciding whether to apply the update data and storing the received version when the another data communication device updates the shared data stored in the another data communication device in the mode of declaring data sharing in the case (2),
wherein in the process G the shared data storing unit all the time stores the update data received when the another data communication device updates the shared data stored in the another data communication device in the mode of declaring data sharing in the case (2), and
wherein the version managing unit creates the version of the shared data updated and stores the created version when the mode controlling unit releases the mode of declaring data sharing.
The data communication device of the invention further comprising a mode controlling unit for switching to a mode of declaring data sharing and a data update commencement message communication unit for communicating a message for commencing data update by using the communication mechanism,
wherein the shared data updating unit as a part of the receiving side communication device by itself stops updating the shared data stored in the shared data storing unit when the data update commencement message communication unit receives the message for commencing data update outside the mode of declaring data sharing and,
wherein the processes of D to G are not implemented when the another communication device updates the shared data stored in the another data communication device outside the mode of declaring data sharing.
The communication mechanism connecting a plurality of other data communication devices have a multicast communication function,
the data communication device stores a identification information of the plurality of other data communication devices and identifies the plurality of other data communication devices by the stored identification information,
the version communication unit as a part of the transmitting side data communication device transmits in multicast the created version to the plurality of identified other data communication devices in the process B when the shared data updating unit updates the shared data stored in the shared data storing unit,
the update data communication unit as a part of the transmitting side data communication device transmits in multicast the created update data to the plurality of identified other data communication devices in the process C when the shared data updating unit updates the shared data stored in the shared data storing unit,
the version communication unit receives the version of the shared data transmitted from the plurality of identified other data communication devices, and
the version managing unit stores the version of the shared data received by the version communication unit with the identification information of the plurality of other data communication devices which transmit the version.
The data communication device of the present invention further comprising a media access control unit for confirming no data received during a pre-determined time,
wherein the version communication unit as a part of transmitting side data communication device transmits in multicast the created version to the plurality of identified other data communication devices after the media access control unit confirming no data received during the predetermined time in the process B when the shared data updating unit updates the shared data stored in the shared data storing unit in the case (1),and
wherein the update data communication unit as a part of the transmitting side data communication device transmits in multicast the update data to the plurality of identified other data communication devices after the media access control unit confirming no data received during the predetermined time in the process C when the shared data updating unit of one data communication device updates the shared data stored in the shared data storing unit in the case (1).
The communication mechanism connecting a plurality of other data communication devices have a multicast communication function,
the data communication device stores identification information of the plurality of other data communication devices and identifies the plurality of other data communication devices by the stored identification information, and
the data communication device further executes;
a process K by the version communication unit, for transmitting in multicast the version stored in the version managing unit to the plurality of identified other communication devices; and
a process L by the update data communication unit, for transmitting in multicast the updated data stored in the shared data storing unit to the plurality of identified other communication devices.
The communication mechanism includes more than two types of communication mechanisms,
the version communication unit can communicate the version of the shared data by using either one of more than two types of communication mechanisms,
and the update data communicating unit can communicate the update data by using either one of more than two types of communication mechanisms.
The version communication unit and the update data communication unit selects a pre-determined communication mechanism, and communicate by using the selected communication mechanism.
The mode controlling unit switches to a mode of declaring data sharing by linking with the another data communication device prior to the processes of the receiving side data communication device even if the another data communication device updates the data stored in the another data communication device.
Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.